package cn.lysj.framework.api.controller;

import cn.lysj.framework.api.base.ApiContent;
import cn.lysj.framework.common.utils.web.ParamUtil;
import cn.lysj.framework.common.utils.web.Resp;
import cn.lysj.framework.config.domain.OrderNote;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author ZhangWenJian
 * @data 2018/12/20--14:27
 * @description
 */
@RestController
@RequestMapping("/api/v1/user")
@Api(value = "ApiConfigController", tags = "商店信息")
public class ApiConfigController extends ApiContent {

    @GetMapping("/get_order_note")
    public Resp getOrderNote(String storeId){
        if(ParamUtil.isBlank(storeId)){
            return new Resp(Resp.PARAM_ERROR,"未取得门店信息!");
        }
        List<OrderNote> orderNotes = orderNoteService.getRepository().findByStoreId(storeId);
        return new Resp(orderNotes);
    }

}
